import java.util.Scanner;
public class task6 {

	public static void main(String[] args) {
		int i , j , n1 , n2;
		
		Scanner scanner = new Scanner(System.in);

		System.out.print("Enter an integer in the range [8, 15]:");
		n1 = scanner.nextInt();
		
		System.out.print("Enter an integer in the range [3, 6]:");
		n2 = scanner.nextInt();
		
		if(n1 < 8 || n1 > 15 || n2 < 3 || n2 > 6)
			System.out.printf("%n%nError: Invalid input");
		else
		{
			for(i=n1 ; i > 0 ; i--)
			{
				for(j=n2 ; j > 0 ; j--)
				{
					System.out.printf("%d * %d = %d \t",i , j , i*j);
				}
			System.out.printf("%n");
			}
		}
		
		
		
		scanner.close();
	}

}
